package com.woniuxy.vue.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

/**
 * @Author: linKe
 * @Date: 2021/11/23 23:17
 * @FileName: Massage
 * @version: 1.0
 * @Description: 消息
 */

@TableName("message")
@Data
public class Message extends Model<Message> {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 内容
     */
    private String content;

    /**
     * 评论人
     */
    private String username;

    /**
     * 评论时间
     */
    private String time;

    /**
     * 父ID
     */
    private Long parentId;

    @TableField(exist = false)
    private Message parentMessage;

    /**
     * 关联id
     */
    private Long foreignId;
    @TableField(exist = false)
    private String avatar;


}
